<!doctype html>
<html lang="en">
<!-- head 区域 - 开始 -->
<?php
$mod='blank';
$title='平台对接';
require_once('head.php');
?>
<!-- head 区域 - 结束 -->

<body data-topbar="dark" data-layout="horizontal">

  <!-- 页面 - 开始 -->
  <div id="layout-wrapper">

    <!-- 头部区域 - 开始 -->
    <?php include('header.php'); ?>
    <!-- 头部区域 - 结束 -->

    <!-- 顶部导航栏 - 开始 -->
    <?php include('topnav.php'); ?>
    <!-- 顶部导航栏 - 结束 -->

    <!-- 主内容区域 - 开始 -->
    <div class="main-content" id="docking">

      <div class="page-content">
        <div class="container-fluid">

          <div class="row mt-4">
            <div class="col-lg-12">
              <div class="card">
                <div class="card-body">
                  <div class="card-button">
                    <button class="btn btn-primary waves-effect waves-light" data-toggle="modal"
                      data-target="#modal-platform">查看平台ID</button>
                  </div>
                 
                  <h4 class="card-title">彩虹代刷对接/小储云对接</h4>
                  <p class="card-title-desc">自定义访问URL</p>
                  
                  <div class="form-group row">
                      <label for="txtFirstNameBilling" class="col-lg-2 col-form-label">用户查询进度</label>
                      <div class="col-lg-10">
                        <input type="text" class="form-control" name="pass" value="http://<?echo($_SERVER['SERVER_NAME']);?>/get" required>
                      </div>
                  </div>

                  <div class="form-group row">
                      <label for="txtFirstNameBilling" class="col-lg-2 col-form-label">自定义访问域名URL</label>
                      <div class="col-lg-10">
                        <input type="text" class="form-control" name="pass" value="http://<?echo($_SERVER['SERVER_NAME']);?>/api.php?act=add" required>
                      </div>
                  </div>
                  <div class="form-group row">
                      <label for="txtFirstNameBilling" class="col-lg-2 col-form-label">POST提交参数</label>
                      <div class="col-lg-10">
                      <input type="text" class="form-control" name="pass" value="uid=你的uid&key=你的key密匙&platform=平台ID&school=学校&user=账号&pass=密码&kcname=课程名字">
                      </div>
                  </div>

                </div>
              </div>
            </div>
          </div><!-- end row -->

        </div> <!-- container-fluid -->
      </div>
      <!-- End Page-content -->

      <!-- 弹窗 -->
      <div class="modal fade primary" id="modal-platform">
        <div class="modal-dialog" role="document">
          <div class="modal-content">
            <div class="modal-header">
              <h4 class="modal-title">平台ID</h4>
              <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true"
                  style="font-size: 30px;">&times;</span>
              </button>
            </div>
            <div class="table-responsive">
              <table class="table table-striped">
                <thead>
                  <tr>
                    <th>ID</th>
                    <th>平台名称</th>
                </thead>
                <tbody>
                  <?php 
                    $a=$DB->query("select * from qingka_wangke_class where status=1 ");
                    while($rs=$DB->fetch($a)){
                      echo "<tr><td>".$rs['cid']."</td><td>".$rs['name']."</td></tr>"; 
                    }
                  ?>
                </tbody>
              </table>
            </div>
            <div class="modal-footer">
              <button type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">取消</button>
              <button type="button" class="btn btn-primary waves-effect waves-light" data-dismiss="modal"
                @click="layer.msg('好的，靓仔')">知道了</button>
            </div>
          </div>
        </div>
      </div>

      <!-- 底部版权区域 - 开始 -->
      <?php include('copyright.php'); ?>
      <!-- 底部版权区域 - 结束 -->

    </div>
    <!-- 主内容区域 - 结束 -->
  </div>
  <!-- 页面 - 结束 -->

  <!-- 底部文件 - 开始 -->
  <?php include('footer.php'); ?>
  <!-- 底部文件 - 结束 -->

  <script type="text/javascript">
    new Vue({
      el: "#docking",
      data: {
        row: null
      },
      methods: {
        get: function (page) {

        }
      },
      mounted() {
        this.get(1);
      }
    });
  </script>
<script>
             //禁止鼠标右击
      document.oncontextmenu = function() {
        event.returnValue = false;
      };
      //禁用开发者工具F12
      document.onkeydown = document.onkeyup = document.onkeypress = function(event) {
        let e = event || window.event || arguments.callee.caller.arguments[0];
        if (e && e.keyCode == 123) {
          e.returnValue = false;
          return false;
        }
      };
      let userAgent = navigator.userAgent;
      if (userAgent.indexOf("Firefox") > -1) {
        let checkStatus;
        let devtools = /./;
        devtools.toString = function() {
          checkStatus = "on";
        };
        setInterval(function() {
          checkStatus = "off";
          console.log(devtools);
          console.log(checkStatus);
          console.clear();
          if (checkStatus === "on") {
            let target = "";
            try {
              window.open("about:blank", (target = "_self"));
            } catch (err) {
              let a = document.createElement("button");
              a.onclick = function() {
                window.open("about:blank", (target = "_self"));
              };
              a.click();
            }
          }
        }, 200);
      } else {
        //禁用控制台
        let ConsoleManager = {
          onOpen: function() {
            alert("Console is opened");
          },
          onClose: function() {
            alert("Console is closed");
          },
          init: function() {
            let self = this;
            let x = document.createElement("div");
            let isOpening = false,
              isOpened = false;
            Object.defineProperty(x, "id", {
              get: function() {
                if (!isOpening) {
                  self.onOpen();
                  isOpening = true;
                }
                isOpened = true;
                return true;
              }
            });
            setInterval(function() {
              isOpened = false;
              console.info(x);
              console.clear();
              if (!isOpened && isOpening) {
                self.onClose();
                isOpening = false;
              }
            }, 200);
          }
        };
        ConsoleManager.onOpen = function() {
          //打开控制台，跳转
          let target = "";
          try {
            window.open("about:blank", (target = "_self"));
          } catch (err) {
            let a = document.createElement("button");
            a.onclick = function() {
              window.open("about:blank", (target = "_self"));
            };
            a.click();
          }
        };
        ConsoleManager.onClose = function() {
          alert("Console is closed!!!!!");
        };
        ConsoleManager.init();
      }
        </script>
</body>

</html>